home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / utility / uuexe656.zip / UUSER.TXT < prev    next >
Text File  |  1996-09-18  |  22KB  |  536 lines

  1. This file contains user documentation for the UUENCODE/DECODE pair.
  2.  
  3.  
  4. SUMMARY:
  5.  
  6. This package encodes and decodes "UUencoded files".  UUencoding is a
  7. popular technique for reliably sending binary files over communications
  8. systems.  Common binary files are "zip files" produced by pkzip, gif and
  9. jpg picture files, and doc files produced by word processors.  To send a
  10. binary file, UUencode the file and send it out with your favorite e-mail
  11. or communications program.  To receive the file, download the UUencoded
  12. version to your PC and UUdecode it.
  13.  
  14. There are many public domain UUencoders and decoders.  This pair was
  15. originally written in 1987 and has been kept up to date since; it is
  16. designed to handle just about anything you can throw at it with ease.
  17.  
  18. For more details on how to use the UUENCODE and UUDECODE programs, read
  19. this document.  For a technical description of the UUencode process, see
  20. UUTECH.TXT.
  21.  
  22.  
  23. SIMPLE, COMMON USE:
  24.  
  25. To decode a file, download it to your PC.  Give the filename an
  26. extension of ".UUE".  (ie: FOO.UUE); this aids you in identifying it as
  27. a uuencoded file.  If the file was sent out in multiple parts, put the
  28. part number on the end of the file name (ie: FOO1.UUE, FOO2.UUE, etc.).
  29.  
  30. Then enter: UUDECODE FOO
  31.  
  32. The name of the file to decode into is saved in the encoded file; so you
  33. do not have to supply it.
  34.  
  35. To encode a file, enter: UUENCODE filename
  36.  
  37. There are all kinds of options, which are described below; but you
  38. should ignore them if the above works for you.
  39.  
  40.  
  41. DISCLAIMER:
  42.  
  43. This program was written by me, Richard Marks, and it is copyrighted.
  44. Please see  the copyright notice in UUTECH.TXT.
  45.  
  46. The program is freeware for personnal, private use.  If used in any
  47. other way, please contact me - there is a modest charge.
  48.  
  49. The feature of MIME Base64 decoding is available as a $20 option.
  50. My address is at the end of this file.
  51.  
  52. The feature of Encryption with encoding and decoding is available as
  53. a $34.95 option.   Please see the discussion of encryption below.
  54.  
  55. ************************************************************************
  56.  
  57. UUENCODE:
  58.  
  59. UUencode a file to send it out over a communications system (e-mail).
  60. Most e-mail systems limit the size of a single message.  A typical limit
  61. is 64 thousand bytes.  UUencode splits the encoded file into parts which
  62. can be sent out one at a time.  Thus a very large file is sent out as
  63. a number of smaller files that are within size limits.
  64.  
  65. UUencode can automatically put checksum characters in the encoded file
  66. so the decode program can do validation.  (Modern communications systems
  67. are so reliable that one rarely sees a checksum error when decoding, but
  68. I still think it is a good idea to leave checksum-ing turned on just to
  69. be sure there are no problems.  This adds at most a few seconds to
  70. encoding and decoding times.)
  71.  
  72. The command:
  73.  
  74.     UUENCODE  [options]  input-file  [output-file]
  75.  
  76.     Popular options:
  77.        -c     - Do not create any checksums. (Checksums recommended!)
  78.  
  79.        -s     - Do NOT split the encoded file into sections.
  80.  
  81.        -s nnn - Split the encoded file into sections of nnn lines,
  82.                 or nnK byte sections.
  83.                 Default is split into 950 line sections.
  84.  
  85.        -h nnn - Leave room in first section for nnn header (extra
  86.                 comment) lines.
  87.  
  88.        -x     - Use XX encoding (see below).
  89.  
  90.        -6     - Use Base64 MIME compliant encoding (see below).
  91.  
  92.     Less Popular options:
  93.        -o     - write to standard output, not to a file.
  94.                 No splitting is done in this case.
  95.  
  96.        -L     - Insert checksums on every line.  This is an old option
  97.                 for use with unreliable communication systems.
  98.  
  99.        -t     - Write the mapping table that was used into the encoded
  100.                 file (see below).
  101.  
  102.        -u     - Unix format file (Unix end of line character).
  103.  
  104.  
  105. UUENCODE INPUT FILE NAME:
  106.  
  107. The input file name must be supplied.  It is the name of the file to be
  108. encoded.  The file name and extension, but not the drive or path, is
  109. saved in the encoded file.  This name is used by UUdecode to recreate a
  110. file with the same name.
  111.  
  112.  
  113. UUENCODE OUTPUT FILE NAME (of the encoded file):
  114.  
  115. This is an optional parameter.  Normally it is not needed.
  116.  
  117. Naming can get a little complicated if you are creating split files.  So
  118. let's take things in little steps.  (The problem is that in automated
  119. systems, there is a need for a variety of ways to specify file names.)
  120.  
  121. First, the normal case is with no output file name supplied:
  122.  
  123.         Output file name is input file name, with a ".UUE" extension.
  124.         Output is to the current directory; the drive & directory
  125.         of the input file is ignored.
  126.  
  127.         UUENCODE FOO.BAR  creates FOO.UUE
  128.  
  129. If you supply an output file name, it is used.  If the output file name
  130. you supply does not have an extension, ".UUE" is used.
  131.  
  132.         UUENCODE FOO.BAR  ABC.DEF  creates ABC.DEF
  133.         UUENCODE FOO.BAR  ABC      creates ABC.UUE
  134.         UUENCODE FOO.BAR  ABC.     creates ABC.
  135.  
  136. Note the subtly of the last example.  The "." after "ABC" is an
  137. extension of all spaces; so there is no extension on the output file.
  138. This differs from the second example where, since there is no ".", the
  139. default extension of ".UUE" is supplied.
  140.  
  141. Normally output is put in to the directory you are in when you enter
  142. the UUencode command (the current directory).  This happens even if the
  143. input file is in some other directory.  But if a drive and/or directory
  144. is specified for the output file, it is used.
  145.  
  146. If you want to use the input file's drive & directory, use a directory
  147. of *\ for the output file.  The input file's drive & directory is used.
  148.  
  149.           UUENCODE ZZZ\FOO.BAR         creates FOO.UUE
  150.           UUENCODE ZZZ\FOO.BAR  ABC    creates ABC.UUE
  151.           UUENCODE ZZZ\FOO.BAR  *\ABC  creates ZZZ\ABC.UUE
  152.           UUENCODE ZZZ\FOO.BAR  *\     creates ZZZ\FOO.UUE
  153.  
  154. The *\ options are very useful in automated systems.
  155.  
  156.  
  157. SPLIT FILES and OUTPUT FILE NAMES:
  158.  
  159. UUencode checks the size of your file, if it is too small to split, the
  160. naming convention above is used.  If the file is larger, the part number
  161. is put into the part name as described below.
  162.  
  163. Normally UUencode splits encoded files by putting a number after the
  164. file name.
  165.          UUENCODE FOO.BAR           creates FOO1.UUE, FOO2.UUE, etc.
  166.          UUENCODE FOO.BAR    *.ZZZ  creates FOO1.ZZZ, FOO2.ZZZ, etc.
  167.          UUENCODE FOO.BAR  ABC.ZZZ  creates ABC1.ZZZ, ABC2.ZZZ, etc.
  168.  
  169. Another popular way to name split files is with the extension of .001,
  170. .002, etc.  If you specify an output file extension of .001, then this
  171. naming convention is used.
  172.  
  173.         UUENCODE FOO.BAR  ABC.001   creates ABC.001, ABC.002, etc.
  174.         UUENCODE FOO.BAR    *.001   creates FOO.001, FOO.002, etc.
  175.  
  176. (I personally prefer to use the ".UUE" extension so I can determine that
  177. this is a UUencoded file from the file name; but some prefer the .001
  178. naming convention.  The .UUE extension is strongly recommended for
  179. Windows95 users.)
  180.  
  181.  
  182. XXENCODING (the -x and -t options):
  183.  
  184. UUencode maps a binary file into a certain character set.  This
  185. character set goes through most communications systems with no problems.
  186. However some communications systems change some of the special
  187. characters used by UUencode.  For example the "{" character is changed
  188. into a "<" on some systems.
  189.  
  190. If you are having this sort of problem mailing to a friend, read on.
  191.  
  192. One could argue that it was a bad decision for UUencode to use
  193. characters that may be changed.  But many years ago, it was hard to find
  194. enough characters that could go over all communications systems
  195. unchanged.  Maybe 15 years ago, the characters that UUencode uses were
  196. a good choice; but today there are other options.
  197.  
  198. The XXencode option, is a better choice.  It uses characters that
  199. usually get through with no problems.  (It uses some lower case
  200. characters; lower case was not common on all computers 15 years ago.)
  201. Unfortunately, XXdecoders are not as commonly available as UUencoders.
  202. If the person you are mailing to has an XXdecoder, try the "-x" option
  203. on UUencode.  My UUdecoder automatically detects and handles XX encoded
  204. files.  Note that the default file extension is .XXE for XX encoded
  205. files.
  206.  
  207. Another option is to send out the mapping table that UUencode uses.
  208. Then whatever gets changed, gets changed in the mapping table and in the
  209. data, so the decode will decode correctly.  If the person you are
  210. mailing to has a UUdecoder that accepts mapping tables, try the -t
  211. option on UUencode.  You can use -x and -t together, but there is no
  212. reason to do this.  My UUdecoder handles mapping tables.  Note that if a
  213. file is changed, UUdecode will report an input file checksum error.
  214. This is OK as long as it does not report an output file checksum error
  215. (what comes out is the important thing).
  216.  
  217.  
  218. Base64 (MIME Compliant) ENCODING:
  219.  
  220. There is a generalized Mail system (MIME) that can use a variety of
  221. encoding techniques.  These include UU, XX, and a new slightly more
  222. efficient encoding method called Base64.  The -6 option enables this
  223. form of encoding.  It also disables all checksums and the table option.
  224.  
  225. Do not use this mechanism unless you are certain that the recepiant can
  226. handle it.  MIME decoders are not yet as popular as UUdecoders.
  227.  
  228. Base64 encoding has one major design problem that is so severe that I
  229. strongly recommend not using it unless required !
  230.  
  231. The specific problem is that, based on the MIME standard RFC 1521,
  232. there is no way to check for missing or corrupted characters.  Now on
  233. modern systems, the underlying file transfer mechanism (TCP, Zmodem)
  234. is supposed to guarantee reliable delivery.  But as you all know,
  235. there are errors.  Base64 has no way to detect errors; UU does.
  236.  
  237. My Base64 decoder prints a message when lines of different lengths
  238. are encountered.  If you know the encoded file will have such lines,
  239. you can suppress the tests with the -L decoding option.
  240.  
  241. MIME has another design problem with multi-part encoded files.  There is
  242. no "end" marker; the decoder knows how many parts there are by a count
  243. in the header lines.  But some MIME encoders (notably the one used when
  244. AOL automatically splits files into sections) do not put in these count
  245. lines.  Thus the decoder does not know this is a multi-part encoding.
  246. The solution is to use the "-p" option. followed by the number of parts.
  247.  
  248.     UUDECODE -6 -p 3  foo1.b64
  249.  
  250. My uudecoder can accept Base64, but to make a little money, it is a
  251. $20 option.  Please see my address below.
  252.  
  253. ************************************************************************
  254.  
  255. UUDECODE:
  256.  
  257. UUdecoding is the inverse of UUencoding.  The input is a UUencoded file
  258. or a several split UUencoded files.  The output is what the original
  259. UUencode started with.
  260.  
  261. This UUdecode automatically checks for just about everything.  It
  262. automatically handles split files, checksums, files packaged with the
  263. Unix 'sed' program, and UU or XX encoding.  But more importantly, over
  264. the years I have encountered many different minor problems and
  265. eccentricities of various communications systems.  (Even CompuServe and
  266. GEnie do, on occasion, insert some weird stuff in the middle of your
  267. files.)  This UUdecode handles all this sort of stuff.
  268.  
  269. In most cases you can just download a whole set of files as:
  270.      FOO1.UUE, FOO2.UUE, etc.
  271. then just enter:
  272.      UUDECODE FOO
  273. with no editing or anything else and "poof" the thing will decode.
  274. (If you have registered UUdecode under Windows 3.1 or 95, you can
  275. double click on the .UUE file to decode it.)
  276.  
  277. The majority of decode problems are related to the PC learning curve
  278. (file naming and directories) or to downloading problems.  However
  279. sometimes you will have a problem situation which occurs when decoding
  280. files from one particular site.  This may require special procedures for
  281. handling files from just that site.
  282.  
  283. The typical site related problem is caused by a non-standard UUencoder.
  284. I have seen a lot of encoded files, but if you think there is a problem,
  285. please contact me.  (Contact info is at the end of this writeup.)
  286.  
  287. The command:
  288.  
  289.     UUDECODE  [options]  input-file  [output-file]
  290.  
  291.     popular options:
  292.         none - normally you do not use any options with UUdecode
  293.  
  294.  
  295.     less popular options:
  296.         -c/C - do not do any checksum testing.  If upper case "C",
  297.                checksum testing is done on the output file but not
  298.                on any input files (see below)
  299.  
  300.         -L   - do not do line level checks (see below)
  301.  
  302.         -s   - do not handle split files
  303.  
  304.         -i   - take input from stdin (implies -s)
  305.  
  306.         -u/x - use UU or XX decoding, do not do automatic analysis
  307.  
  308.         -6   - use Base64 decoding ($20 feature), no automatic analysis
  309.  
  310.         -p n - file is encoded in N parts, used for some Mime Base64
  311.                encoders that do not prperly include the number of parts.
  312.  
  313.  
  314.     options for use in automated systems (see UUTECH.TXT):
  315.         -e/E - call .bat file when decoding complete.
  316.  
  317.         -q   - quiet operation (no beeps)
  318.  
  319.         -y   - force "yes" response to all prompts.
  320.  
  321.         -n   - force "no" response to all prompts.
  322.  
  323.         -z   - use specific "cut" line.
  324.  
  325. Options can be entered in upper or lower case unless, like for c/C,
  326. there is a specific meaning for each case.
  327.  
  328.  
  329. CHECKSUM TESTING:
  330.  
  331. Normally you will want to run UUdecode with all checksum options on.
  332.  
  333. For the novice - what is a checksum?  When all the alphabet soup
  334. UUencoded characters are processed, they are sent through a
  335. mathematical formula that produces a number.  This number is included
  336. at the end of the encoded file.  When decoding, if the calculated
  337. number matches the number included in the file, there is a pretty
  338. good chance the file decoded correctly.
  339.  
  340. Why do I say "a pretty good chance"?  The checksum formula is designed
  341. to catch changes in a few characters and simple transpositions and
  342. omissions.  But if the file is really corrupted, there is a one in two
  343. million chance that the corrupted file will produce a checksum number
  344. that matches.
  345.  
  346. Occasionally you will encounter a file with junk appended to lines and
  347. UUdecode will display messages stating something is wrong with a
  348. specific line.  You may then accept or reject the line.  If you accept
  349. all the supposedly invalid lines and if the resultant file proves
  350. correct, run UUdecode with the -L option to suppress these errors.  Also
  351. let me know of the details as this is some unknown UUencoder that I want
  352. to handle.  See the "contact" section at the end of this document.
  353.  
  354. Some UUencoders insert checksum information in the encoded file.
  355. In many cases if the input file is bad, the output file is also bad.
  356. But frequently the problem with the input file does not affect the
  357. output file.  If you get messages about checksum errors on input files
  358. and the output file is correct, run UUdecode with the -C (upper case)
  359. option to turn off input file checksum tests.
  360.  
  361. If you do get input file checksum errors, they should be understood.
  362. Even if the file decodes with no output file checksum errors; you
  363. should be certain the problem will not cause output file problems in
  364. the future.
  365.  
  366. It is possible, but unlikely, that the output file may have checksum
  367. errors and still be acceptable.  You can turn off all checksum testing
  368. with the -c (lower case) option.  Note: -C or -c imply the -L option.
  369.  
  370.  
  371. FILE NAMING:
  372.  
  373. UUDECODE INPUT FILE NAME:
  374.  
  375. The problem with input file names is that you may be working with split
  376. files.  Perhaps file FOO.EXE is encoded in two parts and you have
  377. downloaded them as FOO1.UUE and FOO2.UUE.  If you supply UUdecode an
  378. input file name of FOO1.UUE, then it will find this file, decode it and
  379. go to FOO2.UUE automatically.
  380.  
  381. However, most users, myself included, have the mind set that they are
  382. working with file FOO and "forget all this other stuff please".  To
  383. handle this situation, UUdecode scans for several variations of the
  384. input file name you supply.
  385.  
  386. If you supply a file name with an extension, FOO.XYZ, that file name is
  387. used.  If not found, then UUdecode puts the number '1' after the file
  388. name (FOO1.XYZ) and UUdecode tries again.
  389.  
  390. The more common case is where just the file name, with no extension is
  391. supplied:
  392.         UUDECODE FOO
  393.  
  394. UUdecode tries the files in the following order:
  395.  
  396.         FOO.UUE
  397.         FOO.XXE         xx encoded file
  398.         FOO1.UUE
  399.         FOO1.XXE
  400.         FOO.001
  401.         FOO.01
  402.         FOO.1
  403.         FOO.
  404.         FOO1.
  405.  
  406. This may seem complicated, but it runs quickly.
  407.  
  408. A drive and directory may also be supplied:
  409.  
  410.         UUDECODE C:\MYDIR\FOO
  411.  
  412. All the above rules apply.  But the given drive & directory is scanned.
  413.  
  414.  
  415. UUDECODE OUTPUT FILE NAME:
  416.  
  417. Normally the name of the output file is obtained from the encoded file;
  418. it was put there when the file was encoded.  The decoded file is
  419. recreated with this file name.  The file is put into the current
  420. directory (the directory from which the UUdecode command is executed).
  421.  
  422. There are several ways to alter this.
  423.  
  424. If you want to specify a specific output file name, optionally with
  425. drive and directory, specify it as the second file on the command line:
  426.  
  427.         UUDECODE FOO  c:\ABC\MYOUT.XXX
  428.  
  429. If you want to use the name from within the encoded file, but with a
  430. specific drive and directory, use the drive:directory with a '*' as the
  431. file name:
  432.  
  433.         UUDECODE FOO  c:ABC\*
  434.  
  435. If you want to use the drive and directory of the input file, use a '*'
  436. as the directory name:
  437.  
  438.         UUDECODE c:ABC\FOO   *\NAME.NEW    drive & dir from encoded file
  439.         UUDECODE c:ABC\FOO   *\            file name from encoded file
  440.  
  441. ************************************************************************
  442.  
  443. WINDOWS 95
  444.  
  445. While this is a DOS program, I use it under Windows95 all the time.
  446. Actually Windows95 "Drop, drag, and double click" makes this program
  447. almost as easy to use as a Windows program.  After things are properly
  448. set up all you will have to do is double click on a ".UUE" file and it
  449. will decode.
  450.  
  451. The trick is file types and registration.  Included with this package
  452. is a "reg" file for Win95.  After you load this package on your
  453. machine, use the Explorer to go to the folder you put it in and find
  454. the UUDECODE.REG file.
  455.  
  456. Right mouse click once on the .REG file and click on "Edit".  Change the
  457. lines containing c:\???\UUDECODE.EXE to state the folder where UUDECODE
  458. resides.  (The machine is not magic, it's somehow gotta know where the
  459. program is.  I suggest putting UUENCODE.EXE and UUDECODE.EXE in your
  460. C:\DOS directory.)  Save the editted .REG file.  Then double click on
  461. it; this will run the Registry program.
  462.  
  463. The net result is that the .UUE, .XXE, and .B64 file types will be
  464. registered with Win95. Then when you double click on a file which is
  465. one of these types, UUDECODE, with the correct options to decode that
  466. file will be started.
  467.  
  468. ************************************************************************
  469.  
  470. ENCRYPTION
  471.  
  472. A new option has been added to this package to encrypt and encode/decode
  473. files.  Encryption/Decryption is done by just supplying a Security Key
  474. when you run UUencode or UUdecode - nothing else is required.
  475.  
  476.      UUENCODE  -K mykey  File
  477.      UUDECODE  -K mykey
  478.  
  479. The same key is used to create and to read the file.  Getting the key to
  480. the receipient, in a secure manner, is your challange.  Keys may be up
  481. to 30 characters long; spaces and other special characters may be in the
  482. key for readability, but are ignored.  The key is case insensitive.  A
  483. very long key means a very high degree of security.  For example:
  484.  
  485.         UUENCODE -K 'Have a very nice sunny day' File
  486.  
  487. A very secure, high dispersion algorithm with a 160 bit key is used.
  488. For best security, send the smallest possible file.  The more data your
  489. opponent has, the easier it is to break the code.
  490.  
  491. I call the Encode/Decode package with encryption UUSECURE.  UUSECURE
  492. costs $34.95.  For an extra $5, I include the Base64 decoding feature,
  493. which seperately is a $20 option.
  494.  
  495. Cavaets:
  496.  
  497. There is no way I can figure out the key; do not contact me if you
  498. forget it.
  499.  
  500. Please remember that all encryption algorithms can be broken; if you use
  501. this program, you must agree that I cannot be held responsible if
  502. somebody breaks the code.  If you have problems with this, please do not
  503. use the program.
  504.  
  505. This program falls under export control laws.  It uses too secure an
  506. encryption scheme for the government to permit it to be exported.  Do
  507. not export it unless you want the Feds at your doorstep.
  508.  
  509. I will soon offer a legal international version that will be programmed
  510. in and will be shipped from South Africa.  For international ordering
  511. information; please contact me.
  512.  
  513. For developers I offer the kernal of the encryption subroutines as an
  514. OLE2 Automation Control.  Very easy to use from VB and Access.
  515.  
  516. ************************************************************************
  517. CONTACTING THE AUTHOR:
  518.  
  519. You can mail me:
  520.         Richard Marks
  521.         931 Sulgrave Lane
  522.         Bryn Mawr, PA  19010
  523.         USA
  524.  
  525. If you encounter a problem I will need to see exactly what you are
  526. working with.  Please send me a diskette with whatever you think is
  527. important.  You can put a 3 1/2" diskette in an envelope with no special
  528. precautions and a single stamp.
  529.  
  530. You may telephone me at (610) 525-8993.  I am usually home after 7PM and
  531. stay up till 11PM - US Eastern Time; it is OK to call then.
  532.  
  533. The latest registered version is available from www.alberts.com, an internet
  534. software store.
  535.  
  536.